home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 12
/
012.d81
/
dos #31
< prev
next >
Wrap
Text File
|
2022-08-26
|
2KB
|
111 lines
DOS & Don'ts -- Part 31
by Jimmy Weiler
And now, for all you readers without
printers, a view of the whole Q&D DIR
DISPLAY program:
1020 OPEN15,8,15,"I0"
1030 Z$=CHR$(0): IL$=CHR$(128):
Q$=CHR$(34): SP$=CHR$(160)
1040 DIM F$(29)
1050 TY$(0)="DEL": TY$(1)="SEQ":
TY$(2)="PRG": TY$(3)="USR":
TY$(4)="REL"
1060 OPEN8,8,8,"$"
1070 BU=0
1080 FOR C1=1 TO 142:GET#8,K$:NEXT
1090 PRINT"NAME:<rvon>"; FOR C1=144 TO
160: GET#8,K$: PRINT K$;: NEXT
PRINT "<rvof> ";
1100 GET#8,L$,M$,N%: PRINT"ID:"M$;N$
1110 FOR C1=164 TO 255: GET#8,K$:NEXT
1120 FOR FILE=1 TO 144
1130 FOR BYTE=0 TO 29: GET#8,F$(BYTE):
NEXT: IF ST=66 THEN FILE=150:
GOTO 1240
1140 F$(0)=F$(0)+Z$
1150 IF F$(0)<IL$ THEN 1220
1160 PRINT TY$(ASC(F$(0))-128);": ";
1170 PRINT Q$;: FOR LTTR=3 TO 18: IF
F$(LTTR) <> SP$ THEN PRINT
F$(LTTR);
1180 NEXT: PRINT Q$;
1190 SZ=256*ASC(F$(29)+Z$)+ASC(F$(28))
1200 PRINT TAB(23-(SZ<100)-(SZ<10))SZ
"BLOCK";:IF SZ<>1 THEN PRINT"S";
1210 PRINT
1220 IF FILE/8 <> INT(FILE/8)THEN
GET#8,L$,M$
1230 BU=BU+SZ: SZ=0
1240 NEXT FILE:
PRINT BU"OF 664 BLOCKS USED."
When the directory is read as a
file, each block contains 254
accessible characters. Remember that
zero is significant, so the characters
are only numbered up to 253. These
charts describe the layout of each
block.
First block: BAM & Header
Char. Description
--------------------------------------
2-141 BAM
142-159 Disk Name
160-161 Disk ID
--------------------------------------
Subsequent blocks: Directory
--------------------------------------
Char. Description
0- 29 File entry 1
32- 61 File entry 2
64- 93 File entry 3
96-125 File entry 4
128-157 File entry 5
160-189 File entry 6
192-221 File entry 7
224-253 File entry 8
--------------------------------------
File entry structure:
Char. Description
--------------------------------------
0 File type.
1- 2 Track & sector of first file
data block.
3- 18 File name.
19- 20 Relative file-- first side
sector track and sector.
21 Relative file record size.
28- 29 Number of blocks in the file.
--------------------------------------
For detailed information about 1541
directories, see pages 24 and 25 of
the VIC-1541 SINGLE DRIVE FLOPPY DISK
USER'S MANUAL, the booklet that comes
in the box when you buy a 1541 drive.
=========< end of article >===========